<!--督导结果分析-->
<template>
  <div class="wrapper-container">
    <div
      class="search-container"
      style="justify-content: space-between !important;"
    >
      <div class="search-container">
        <SelectItem
          :name="'学期'"
          :value="xq"
          @change="
            (e) => {
              xq = e;
            }
          "
          :xqList="xqList"
        ></SelectItem>

        <SelectItem
          :name="'月份'"
          :value="mounth"
          @change="
            (e) => {
              mounth = e;
            }
          "
          :xqList="mounthList"
        ></SelectItem>

        <InputItem
          v-if="radio4 == '按督导专家'"
          :name="'专家姓名'"
          :value="teacherName"
          @input="
            (e) => {
              teacherName = e;
            }
          "
        ></InputItem>

        <div class="search-button">
          <img src="../../../assets/assessment/icon-search.png" alt="" />
          <span>查询</span>
        </div>
      </div>

      <div class="filter-button">
        <el-radio-group v-model="radio4" size="mini">
          <el-radio-button style="padding-right: 10px;" label="按月份统计"
            >按月份统计</el-radio-button
          >
          <el-radio-button label="按督导专家">按督导专家</el-radio-button>
        </el-radio-group>
      </div>
    </div>
    <div class="table-container">
      <el-table
        :data="tableData"
        border
        style="width: 100%"
        class="table-data"
        row-class-name="row-class"
        cell-class-name="cell-class"
        header-row-class-name="header-row-class"
        header-cell-class-name="header-cell-class"
      >
        <el-table-column
          sortable
          prop="faculty"
          label="系"
          width="156"
          align="center"
        >
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="teacherName"
          label="专家姓名"
          width="155"
          align="center"
          sortable
        >
        </el-table-column>
        <el-table-column
          sortable
          prop="date"
          label="年月"
          width="155"
          align="center"
        >
        </el-table-column>

        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="zxddks"
          label="专项督导课时"
          width="155"
          align="center"
        >
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="rctkks"
          label="日常听课课时"
          width="155"
          align="center"
        >
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="sumNumber"
          label="总课时"
          width="155"
          align="center"
        >
        </el-table-column>
        <el-table-column v-else label="按督导专家单位统计">
          <el-table-column
            prop="zxddks"
            label="专项督导课时"
            width="155"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="rctkks"
            label="日常听课课时"
            width="155"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="sumNumber"
            label="总课时"
            width="155"
            align="center"
          >
          </el-table-column>
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="sumTimes"
          label="听课总次数"
          width="155"
          align="center"
        >
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="good"
          label="优"
          align="center"
        >
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="secGood"
          label="良"
          align="center"
        >
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="middle"
          label="中"
          align="center"
        >
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="bad"
          label="差"
          align="center"
        >
        </el-table-column>
        <el-table-column
          v-if="radio4 == '按督导专家'"
          prop="rate"
          label="优秀率"
          align="center"
        >
        </el-table-column>

        <el-table-column v-else label="按被听教员单位统计">
          <el-table-column prop="good" label="优" align="center">
          </el-table-column>
          <el-table-column prop="secGood" label="良" align="center">
          </el-table-column>
          <el-table-column prop="middle" label="中" align="center">
          </el-table-column>
          <el-table-column prop="bad" label="差" align="center">
          </el-table-column>
          <el-table-column
            prop="sumTimes"
            label="被听总次数"
            width="155"
            align="center"
          >
          </el-table-column>
          <el-table-column prop="rate" label="优秀率" align="center">
          </el-table-column>
        </el-table-column>
      </el-table>
    </div>

    <div class="search-container">
      <ButtonItem
        :name="'导出Excel'"
        :link="''"
        :icon="'el-icon-download'"
        :buttonColor="'yellow'"
      ></ButtonItem>
    </div>
  </div>
</template>

<script>
import SelectItem from "../../../components/SelectItem.vue";
import InputItem from "../../../components/InputItem.vue";
import ButtonItem from "../../../components/ButtonItem.vue";
export default {
  components: {
    SelectItem,
    InputItem,
    ButtonItem,
  },
  data() {
    return {
      radio4: "按督导专家",
      xq: "2020春",
      xqList: [
        {
          value: "2020春",
          label: "2020春",
        },
        {
          value: "2020夏",
          label: "2020夏",
        },
      ],
      mounth: "12月",
      mounthList: [],
      teacherName: "",
      tableData: [
        {
          faculty: "计算机系",
          teacherName: "教员一",
          date: "2022年1月",
          zxddks: "80",
          rctkks: "20",
          sumNumber: "100",
          sumTimes: "12",
          good: "7",
          secGood: "7",
          middle: "7",
          bad: "7",
          rate: "70%",
        },
        {
          faculty: "计算机系2",
          teacherName: "教员一",
          date: "2022年1月",
          zxddks: "80",
          rctkks: "20",
          sumNumber: "100",
          sumTimes: "12",
          good: "7",
          secGood: "7",
          middle: "7",
          bad: "7",
          rate: "70%",
        },
        {
          faculty: "计算机系3",
          teacherName: "教员一",
          date: "2022年1月",
          zxddks: "80",
          rctkks: "20",
          sumNumber: "100",
          sumTimes: "12",
          good: "7",
          secGood: "7",
          middle: "7",
          bad: "7",
          rate: "70%",
        },
      ],
    };
  },
  methods: {},
  mounted() {
    var _this = this;
    var tempArry = Array.from(new Array(12).keys());
    tempArry.forEach(function(e) {
      _this.mounthList.push({
        value: e + 1,
        label: e + 1 + "月",
      });
    });
  },
};
</script>
<style lang="less" scoped>
.search-container {
  justify-content: flex-start !important;
}

.search-button {
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 27px;
  background: #f1f8fe;
  border: 1px solid #51aef6;
  border-radius: 6px;

  > span {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #51aef6;
  }

  > img {
    width: 19px;
    height: 19px;
    margin-right: 4px;
  }
}

.table-container {
  margin-top: 30px;

  .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  .el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }

  .wrapper-button {
    display: flex;
    flex-direction: column;
    align-items: center;

    > div {
      margin-bottom: 8px;
    }
  }
}
</style>

<style lang="less" scoped>
@import "../../../styles/special.less";
.table-container::v-deep .el-table__header th {
  border-color: #c7d7eb !important;
  padding-left: 10px;
}
.filter-button {
  margin-top: 27px;
}
.filter-button::v-deep .el-radio-button .el-radio-button__inner {
  border-radius: 6px !important;
  border: 1px solid rgb(251, 30, 21);
  color: rgb(251, 30, 21);
  background-color: rgb(254, 234, 235);
}
.filter-button::v-deep
  .el-radio-button__orig-radio:checked
  + .el-radio-button__inner {
  border: 1px solid rgb(251, 30, 21);
  color: white;
  background-color: rgb(251, 30, 21);
}
.wrapper-container {
  width: 1711px;
  margin: 0 auto;
}
.table-container {
  margin-top: 30px;

  .table-data {
    width: 100%;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}

.save-button {
  width: 87px;
  height: 36px;
  line-height: 36px;
  background: #fff6ef;
  border: 1px solid #f3b815;
  border-radius: 6px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #f3b815;
  text-align: center;
  margin: 82px auto;
}

.zuoyou {
  width: 200px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
</style>
